package com.sdkj.recruit.dao.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.annotation.Persistent;
import org.springframework.stereotype.Service;

import com.sdkj.recruit.dao.IMongodbDAO;
import com.sdkj.recruit.dao.IWeixinConfigDao;
import com.sdkj.recruit.model.WeixinConfig;
import com.sdkj.recruit.mongoSupport.QueryParamCreator;


@Persistent
@Service("weixinConfigDao")
public class WeixinConfigDao implements IWeixinConfigDao {

	
	@Autowired
	private IMongodbDAO dao;
	
	@Override
	public void saveWeixinConfig(WeixinConfig wc) {
		dao.saveOrUpdatePO(wc);
	}

	@Override
	public WeixinConfig querySessionKeyByUniqueId(String uniqueId) {
		return dao.getPO(WeixinConfig.class, QueryParamCreator.eq("uniqueId", uniqueId));
	}

}
